#include<stdio.h>
#include<stdarg.h>
double average(int num ,...)
{
	va_list valist;
	double sum = 0.0;
	int i;
	va_start(valist,num);
	for(i = 0 ; i < num ; i++){
		int temp = va_arg(valist,int);
		sum += temp;
	}

	va_end(valist);
	return sum/num;


}
int main()
{
	printf("Average of 3,4,5 = %f\n",average(3,3,4,5));
	printf("Average of 3,4,5,1,7 = %f\n",average(5,1,7,3,4,5));
	return 0;

}
